package com.cy.deepseeksport.mapper;

import com.cy.deepseeksport.domain.ScheduleResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
* @author chen
* @description 针对表【schedule_result】的数据库操作Mapper
* @createDate 2025-05-23 23:01:39
* @Entity com.cy.deepseeksport.domain.ScheduleResult
*/
public interface ScheduleResultMapper extends BaseMapper<ScheduleResult> {
    @Select("""
            SELECT * FROM schedule_result
            WHERE 
                (home_team_name_simplified LIKE #{homeTeam} OR 
                 away_team_name_simplified LIKE #{awayTeam})
            ORDER BY match_time ASC;
        
        """)
    List<ScheduleResult> selectMatches(
            @Param("homeTeam") String homeTeamCondition,
            @Param("awayTeam") String awayTeamCondition
    );
}




